import request from '@/utils/request'

export function orderList (userid) {
  return request({
    url: '/orderList',
    method: 'post',
    data: {
      userid
    }
  })
}

export function buyStock (userid, stockcode, stockname, cost, number) {
  return request({
    url: '/buy',
    method: 'post',
    data: {
      userid,
      stockcode,
      stockname,
      cost,
      number
    }
  })
}

export function sellStock (userid, stockcode, stockname, cost, number) {
  return request({
    url: '/sell',
    method: 'post',
    data: {
      userid,
      stockcode,
      stockname,
      cost,
      number
    }
  })
}
